package test_function;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class Function02 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("徐瑞琪-21");
        List<Student> collect = list.stream().map(Student::new).collect(Collectors.toList());
        System.out.println(collect);
        Student[] students = list.stream().map(Student::new).toArray(Student[]::new);
        System.out.println(students);
    }
}
